package com.example.carRental.exception;

import lombok.AllArgsConstructor;

/**
 * @author
 * @description 异常枚举类
 * @date 2022/1/31
 */
@AllArgsConstructor
public enum CodeEnum implements  ExceptionAssert {
    success(200, "成功"),
    fail(400, "失败"),
    error(500, "系统异常"),
    info_not_exist(210,"有信息为空");


    public int code;
    public String message;

    public int getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }

    @Override
    public void assertIsEquals(Object o1, Object o2) throws Exception {
        ExceptionAssert.super.assertIsEquals(o1, o2);
    }

    @Override
    public void assertIsNotNull(Object obj) {
        ExceptionAssert.super.assertIsNotNull(obj);
    }

    @Override
    public void throwException() {
        ExceptionAssert.super.throwException();
    }


}
